﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using ProductCollector.com.ebay.developer;

namespace ProductCollector {
    public class EbayFindingService : FindingService {
        protected override System.Net.WebRequest GetWebRequest(Uri uri) {
            try {
                HttpWebRequest request = (HttpWebRequest)base.GetWebRequest(uri);
                request.Headers.Add("X-EBAY-SOA-SECURITY-APPNAME", "Homea2bd9-d5bf-4234-8daf-4becd8f45d7");
                request.Headers.Add("X-EBAY-SOA-OPERATION-NAME", "findItemsByKeywords");
                request.Headers.Add("X-EBAY-SOA-SERVICE-NAME", "FindingService");
                request.Headers.Add("X-EBAY-SOA-MESSAGE-PROTOCOL", "SOAP11");
                request.Headers.Add("X-EBAY-SOA-SERVICE-VERSION", "1.0.0");
                request.Headers.Add("X-EBAY-SOA-GLOBAL-ID", "EBAY-US");
                return request;
            } catch (Exception ex) {
                throw ex;
            }
        }
    }
}
